Replication archive for "Who Gets a Second Chance? Effectiveness and Equity in Supervision of Criminal Offenders"
Prepared: November 2020
Author: Evan K. Rose, Microsoft Research


This archive contains all code and publicly available data used to produce the analyses in "Who Gets
a Second Chance? Effectiveness and Equity in Supervision of Criminal Offenders." Each file is internally
documented, but this readme provides a general overview of the archive. The primary files are as follows:


BUILD FILES
    - code/build_aoc.py.
		   This file processes arrest data provided by North Carolina's administrative office
                    of the courts. The data outputs are used in subsequent files to measure recidivism,
                    calculate the length of prison sentences, and measure the length of suspended sentences
                    activated by revocation.
    - code/build_probation.py.
		   This file builds the core analysis sample of treated and control probation spells.
                    It relies on files outputted by build_aoc as well as confidential data on supervised 
                    probationers provided directly by the North Carolina Department of Public Safety.


DIF-IN-DIF ANALYSIS FILES
    - code/premable.do.
		   This file formats requisite variables in the main analysis dataset. It is called by all 
                    other State analysis files.
    - code/figures.do.
		   This file produces the core figures in the paper.
    - code/tables.do.
		   This file produces the core tables in the paper.
    - code/descriptives.py.
		   This file produces Table 2. 
    - code/race_effects.py.
		   This file estimates descriptive regressions measuring racial disparities in probation 
                    outcomes. It merges on confidential test score data from the NC Education Research Data Center.
    - code/honestdd.R
            This file produces the "honest dif-in-dif" analysis from Rambachan and Roth (2010) and contained in the
                    appendix.
 


HAZARD MODEL ANALYSIS FILES
    - mmph/mmph_functions.py.
	            This module contains all likelihood functions for estimation of the hazard model
                    in Section 5. 
    - mmph/esetimate.py.
		   This file estimate hazard models under various options.
    - mmph/data_build.py.
		   This file uses the core analysis sample to build data elements used in estimation.
    - mmph/read_results.py.
		   This file reads hazard model estimates and produces associated tables and figures.
    - mmph/consolidate_results.py.
	            This file calls read_results with appropriate arguments to produce the tables
                    and figures in the paper.


OTHER FILES
    - requirements.txt. A pip freeze of the python environment used to execute all code.
